package com.qfmy.webapp.controller.common;

import com.qfmy.common.result.Result;
import com.qfmy.model.vo.common.AppUpdateVo;
import com.qfmy.webapp.service.common.AppUpdateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 清风明月
 * @Package com.qfmy.webapp.controller.common
 * @date 2025/11/24
 * @description app升级中心
 */
@RestController
@SuppressWarnings("all")
@RequestMapping("/app/update")
public class AppUpdateController {

    /**
     * 注入service
     */
    @Autowired
    private AppUpdateService appUpdateService;

    /**
     * 获取最新的版本信息
     */
    @RequestMapping("/getLatestVersion")
    public Result<AppUpdateVo> getLatestVersion() {
        AppUpdateVo appUpdateVo = appUpdateService.getLatestVersion();
        return Result.ok(appUpdateVo);
    }

}
